package com.jwell.panrank.model

import com.jwell.driverapp.tools.BaseSubscriber
import com.jwell.panrank.application.App
import com.jwell.panrank.contract.CarInquireContract
import io.reactivex.android.schedulers.AndroidSchedulers
import io.reactivex.schedulers.Schedulers

/**
 * Created by 76577 on 2018/6/19.
 * 车辆查询
 */
class CarInquireModel : CarInquireContract.Model, BaseModel() {
    override fun getMaKanCount(baseSubscriber: BaseSubscriber) {
        getApiStore().getMaKanCount()
                .subscribeOn(Schedulers.io())
                .unsubscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(baseSubscriber)
    }

    override fun searchListData( baseSubscriber: BaseSubscriber) {
        getApiStore().getBillStateCount()
                .subscribeOn(Schedulers.io())
                .unsubscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(baseSubscriber)
    }
}